home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form BevelOptFrm
- BackColor = &H8000000F&
- BorderStyle = 3 'Fixed Double
- Caption = "3D Bevel Options"
- ClientHeight = 2400
- ClientLeft = 3825
- ClientTop = 5520
- ClientWidth = 4305
- ClipControls = 0 'False
- ControlBox = 0 'False
- Height = 2805
- KeyPreview = -1 'True
- Left = 3765
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2400
- ScaleWidth = 4305
- Top = 5175
- Width = 4425
- Begin PZPanel BackPan
- BackColor = &H00C0C0C0&
- Caption = "PZPanel1"
- Height = 4005
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 7395
- Begin PZLabel ColorOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuterWidth = 1
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 7
- Left = 2220
- TabIndex = 32
- Top = 1110
- Width = 1905
- End
- Begin PZLabel ColorOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BevelOuterWidth = 1
- Caption = "Set Color..."
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 6
- Left = 2220
- TabIndex = 31
- Top = 720
- Width = 1905
- End
- Begin PZLabel ColorOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuterWidth = 1
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 5
- Left = 2220
- TabIndex = 30
- Top = 1110
- Width = 1905
- End
- Begin PZLabel ColorOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BevelOuterWidth = 1
- Caption = "Set Color..."
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 4
- Left = 2220
- TabIndex = 29
- Top = 720
- Width = 1905
- End
- Begin PZLabel ColorOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BevelOuterWidth = 1
- Caption = "Black Shade"
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 3
- Left = 2220
- TabIndex = 28
- Top = 1110
- Width = 1905
- End
- Begin PZLabel ColorOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BevelOuterWidth = 1
- Caption = "White Light"
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 2
- Left = 2220
- TabIndex = 27
- Top = 720
- Width = 1905
- End
- Begin PZLabel WidthLab
- BorderOuter = 1 'Solid
- Caption = "5"
- ForeColor = &H00800000&
- Height = 255
- Index = 3
- Left = 2250
- TabIndex = 26
- Top = 1530
- Width = 435
- End
- Begin PZLabel WidthLab
- BorderOuter = 1 'Solid
- Caption = "5"
- ForeColor = &H00800000&
- Height = 255
- Index = 2
- Left = 2250
- TabIndex = 25
- Top = 1530
- Width = 435
- End
- Begin PZLabel WidthLab
- BorderOuter = 1 'Solid
- Caption = "5"
- ForeColor = &H00800000&
- Height = 255
- Index = 1
- Left = 2250
- TabIndex = 24
- Top = 1530
- Width = 435
- End
- Begin PZLabel Tabs
- Alignment = 6 'Center - TOP
- BackColor = &H00C0C0C0&
- BevelInner = 2 'Raised
- BevelInnerWidth = 1
- BevelOuter = 2 'Raised
- BevelOuterShading= 2 'Dark
- BevelOuterWidth = 1
- Caption = "Outer Bevel"
- CornerSize = 4
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 585
- Index = 0
- Left = 60
- TabIndex = 1
- TabStyle = 1 'Top Tab
- Top = 60
- Width = 1065
- WordWrap = -1 'True
- End
- Begin PZLabel WidthLab
- BorderOuter = 1 'Solid
- Caption = "5"
- ForeColor = &H00800000&
- Height = 255
- Index = 0
- Left = 2250
- TabIndex = 2
- Top = 1530
- Width = 435
- End
- Begin PZLabel PanCmd
- BackColor = &H00C0C0C0&
- BevelInnerWidth = 3
- BevelOuter = 2 'Raised
- BevelOuterWidth = 3
- BorderOuter = 1 'Solid
- BorderOuterWidth= 2
- Caption = "Cancel"
- CornerSize = 4
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 435
- Index = 0
- Left = 540
- TabIndex = 3
- Top = 1860
- Width = 1215
- End
- Begin PZLabel PanCmd
- BackColor = &H00C0C0C0&
- BevelInnerWidth = 3
- BevelOuter = 2 'Raised
- BevelOuterWidth = 3
- BorderOuter = 1 'Solid
- BorderOuterWidth= 2
- Caption = "OK"
- CornerSize = 4
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 435
- Index = 1
- Left = 2550
- TabIndex = 4
- Top = 1860
- Width = 1215
- End
- Begin PZLabel WidthPan
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BevelOuterWidth = 1
- Caption = "Width"
- CaptionMargin = 68
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = 32
- IconTop = -7
- Left = 2220
- TabIndex = 5
- Top = 1500
- Width = 1905
- End
- Begin PZLabel ColorOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BevelOuterWidth = 1
- Caption = "White Light"
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 0
- Left = 2220
- TabIndex = 6
- Top = 720
- Width = 1905
- End
- Begin PZLabel BevelOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BevelOuterWidth = 1
- Caption = "None"
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 0
- Left = 180
- TabIndex = 7
- Top = 720
- Width = 1905
- End
- Begin PZLabel BevelOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BevelOuterWidth = 1
- Caption = "Inset"
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 1
- Left = 180
- TabIndex = 8
- Top = 1110
- Width = 1905
- End
- Begin PZLabel BevelOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BevelOuterWidth = 1
- Caption = "Raised"
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 2
- Left = 180
- TabIndex = 9
- Top = 1500
- Width = 1905
- End
- Begin PZLabel BevelOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BevelOuterWidth = 1
- Caption = "None"
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 3
- Left = 180
- TabIndex = 17
- Top = 720
- Width = 1905
- End
- Begin PZLabel BevelOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BevelOuterWidth = 1
- Caption = "Inset"
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 4
- Left = 180
- TabIndex = 16
- Top = 1110
- Width = 1905
- End
- Begin PZLabel BevelOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BevelOuterWidth = 1
- Caption = "Raised"
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 5
- Left = 180
- TabIndex = 15
- Top = 1500
- Width = 1905
- End
- Begin PZLabel BevelOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BevelOuterWidth = 1
- Caption = "None"
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 6
- Left = 180
- TabIndex = 18
- Top = 720
- Width = 1905
- End
- Begin PZLabel BevelOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BevelOuterWidth = 1
- Caption = "Solid"
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 7
- Left = 180
- TabIndex = 19
- Top = 1110
- Width = 1905
- End
- Begin PZLabel BevelOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BevelOuterWidth = 1
- Caption = "Filled"
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 8
- Left = 180
- TabIndex = 20
- Top = 1500
- Width = 1905
- End
- Begin PZLabel BevelOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BevelOuterWidth = 1
- Caption = "None"
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 9
- Left = 180
- TabIndex = 21
- Top = 720
- Width = 1905
- End
- Begin PZLabel BevelOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BevelOuterWidth = 1
- Caption = "Solid"
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 10
- Left = 180
- TabIndex = 22
- Top = 1110
- Width = 1905
- End
- Begin PZLabel BevelOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BevelOuterWidth = 1
- Caption = "Filled"
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 11
- Left = 180
- TabIndex = 23
- Top = 1500
- Width = 1905
- End
- Begin PZLabel ColorOpt
- Alignment = 1 'Left Justify - MIDDLE
- BackColor = &H00C0C0C0&
- BevelOuter = 1 'Inset
- BevelOuterWidth = 1
- Caption = "Black Shade"
- CaptionMargin = 25
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 315
- IconLeft = -4
- IconTop = -6
- Index = 1
- Left = 2220
- TabIndex = 10
- Top = 1110
- Width = 1905
- End
- Begin PZLabel TabPan
- Alignment = 6 'Center - TOP
- BackColor = &H00C0C0C0&
- BevelInner = 2 'Raised
- BevelInnerWidth = 1
- BevelOuter = 2 'Raised
- BevelOuterShading= 2 'Dark
- BevelOuterWidth = 1
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = -1 'True
- ForeColor = &H00800000&
- Height = 1755
- Left = 60
- TabIndex = 11
- Top = 600
- Width = 4170
- End
- Begin PZLabel Tabs
- Alignment = 6 'Center - TOP
- BackColor = &H00FFFFFF&
- BevelInner = 2 'Raised
- BevelInnerWidth = 1
- BevelOuter = 2 'Raised
- BevelOuterShading= 2 'Dark
- BevelOuterWidth = 1
- Caption = "Outer Border"
- CornerSize = 4
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 585
- Index = 2
- Left = 2160
- TabIndex = 12
- TabStyle = 1 'Top Tab
- Top = 60
- Width = 1035
- WordWrap = -1 'True
- End
- Begin PZLabel Tabs
- Alignment = 6 'Center - TOP
- BackColor = &H00FFFFFF&
- BevelInner = 2 'Raised
- BevelInnerWidth = 1
- BevelOuter = 2 'Raised
- BevelOuterShading= 2 'Dark
- BevelOuterWidth = 1
- Caption = "Inner Border"
- CornerSize = 4
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 585
- Index = 3
- Left = 3195
- TabIndex = 13
- TabStyle = 1 'Top Tab
- Top = 60
- Width = 1035
- WordWrap = -1 'True
- End
- Begin PZLabel Tabs
- Alignment = 6 'Center - TOP
- BackColor = &H00FFFFFF&
- BevelInner = 2 'Raised
- BevelInnerWidth = 1
- BevelOuter = 2 'Raised
- BevelOuterShading= 2 'Dark
- BevelOuterWidth = 1
- Caption = "Inner Bevel"
- CornerSize = 4
- Font3D = 2 'Block Right
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00800000&
- Height = 585
- Index = 1
- Left = 1125
- TabIndex = 14
- TabStyle = 1 'Top Tab
- Top = 60
- Width = 1035
- WordWrap = -1 'True
- End
- End
- Begin Image IconImg
- Height = 480
- Index = 5
- Left = 2670
- Picture = BEVELOPT.FRX:0000
- Top = 3930
- Width = 480
- End
- Begin Image IconImg
- Height = 480
- Index = 4
- Left = 2250
- Picture = BEVELOPT.FRX:0302
- Top = 3960
- Width = 480
- End
- Begin Image IconImg
- Height = 480
- Index = 3
- Left = 1830
- Picture = BEVELOPT.FRX:0604
- Top = 3960
- Width = 480
- End
- Begin Image IconImg
- Height = 480
- Index = 2
- Left = 1320
- Picture = BEVELOPT.FRX:0906
- Top = 3960
- Width = 480
- End
- Begin Image IconImg
- Height = 480
- Index = 1
- Left = 750
- Picture = BEVELOPT.FRX:0C08
- Top = 3960
- Width = 480
- End
- Begin Image IconImg
- Height = 480
- Index = 0
- Left = 210
- Picture = BEVELOPT.FRX:0F0A
- Top = 3930
- Width = 480
- End
- Option Explicit
- Dim KeyIn(3) As Integer
- Dim Spinning As Integer
- Dim zTab As Integer
- Sub BevelOpt_Click (index As Integer)
- Dim i As Integer
- i = index \ 3
- Tabs(i).Tag = Str$(index - i * 3)
- ShowOptions False
- End Sub
- Sub ColorOpt_Click (index As Integer)
- Dim i As Integer
- If index < 4 Then
- i = (index And 1) + 1 Xor Val(ColorOpt(index).Tag)
- ColorOpt(index).Tag = Str$(i)
- ShowOptions False
- ElseIf (index And 1) = 0 Then
- CD.Flags = CC_RGBINIT
- CD.Color = Val(ColorOpt(index).Tag)
- CD.Action = DLG_COLOR
- ColorOpt(index).Tag = Str$(CD.Color)
- End If
- End Sub
- Sub Form_Activate ()
- KeyIn(0) = False
- ShowOptions True
- End Sub
- Sub Form_KeyPress (keyascii As Integer)
- Dim i As Integer
- Dim key As String
- Dim Value As Integer
- Value = Val(WidthLab(zTab))
- key = Chr$(keyascii)
- Select Case key
- Case "0" To "9"
- If KeyIn(zTab) Then
- Value = Value * 10 + keyascii - &H30
- Else
- KeyIn(zTab) = True
- Value = keyascii - &H30
- End If
- Case Chr$(8) ' backspace
- Value = Value \ 10
- End Select
- If Value > 30 Then
- Value = 30
- End If
- WidthLab(zTab) = Str$(Value)
- ShowOptions False
- End Sub
- Sub PanCmd_MouseDown (index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
- PanCmd(index).BevelOuter = 1
- End Sub
- Sub PanCmd_MouseUp (index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
- PanCmd(index).BevelOuter = 2
- DoEvents
- Tag = Str$(index)
- Me.Hide
- End Sub
- Sub ShowOptions (ByVal ToBeShown As Integer)
- Dim i As Integer, j As Integer, k As Integer, z As Integer
- Dim hIcon As Integer
- ' After the form has been shown, the backpanel doesn't need
- ' to be painted when updating other controls - this prevents
- ' flashing
- BackPan.EnablePainting = ToBeShown
- ' the TabPan tag represents which tab is "up"
- z = Val(TabPan.Tag)
- If zTab <> z Then
- ' reorder the tabs - KeyIn is used to remember if
- ' a value has been typed into the width label for this
- ' tab
- KeyIn(z) = False
- For i = 0 To 3
- If i = z Then
- Tabs(i).BackColor = &HC0C0C0
- Tabs(i).ZOrder
- Else
- Tabs(i).BackColor = &HFFFFFF
- Tabs(i).ZOrder 1
- End If
- Next
- ' allow the tabs to paint
- If Not ToBeShown Then DoEvents
- End If
- ' the tab panel doesn't need to paint any more
- TabPan.EnablePainting = ToBeShown
- ' show the options that correspond to the "up" tab
- ' note that there is a set of three Bevel options per tab
- ' and each set occupies the same space
- For j = 0 To 11
- BevelOpt(j).Visible = False
- If j < 4 Then WidthLab(j).Visible = False
- If j < 8 Then ColorOpt(j).Visible = False
- Next
- For j = 0 To 2
- ' set the bevel options
- k = z * 3 + j
- hIcon = 3
- If j = Val(Tabs(z).Tag) Then
- hIcon = 4
- End If
- BevelOpt(k).Icon = IconImg(hIcon).Picture
- BevelOpt(k).Visible = True
- ' set the color options also
- If j < 2 Then
-
- k = z * 2 + j
- hIcon = 0 ' this means no icon
- If z < 2 Then
- hIcon = 3 ' for tabs 0 and 1 option off by default
- If Val(ColorOpt(k).Tag) Then
- hIcon = 4
- End If
- ElseIf j = 0 Then
- hIcon = 5 ' for tabs 2 and 3 a little green button
- End If
- If hIcon Then ColorOpt(k).Icon = IconImg(hIcon).Picture
- ColorOpt(k).Visible = True
- End If
- Next
- 'WidthLab(z) = WidthLab(z).Tag
- WidthLab(z).Visible = True
- ' clip out the width spinner labels (since they all occupy the same
- ' location you only need to clip the first one
- WidthLab(0).ClipCtl = WidthPan.hCtl
- ' stop all that spinning...
- If Not Spinning Then WidthPan.Icon = IconImg(0).Picture
- ' now let everybody finish painting before restoring the
- ' background painting
- DoEvents
- zTab = z
- TabPan.EnablePainting = True
- BackPan.EnablePainting = True
- End Sub
- Sub Tabs_Click (index As Integer)
- TabPan.Tag = Str$(index)
- ShowOptions False
- End Sub
- Sub WidthPan_MouseDown (Button As Integer, Shift As Integer, x As Single, y As Single)
- Dim i As Integer, n As Integer
- Dim ix As Integer, iy As Integer
- Dim t As Single
- ' the following spinner index values were derived by subtracting
- ' an offset and dividing by the size of the spin hot spots
- ' if iy = 1 and ix = 1 or 2 then we got a click
- ix = (x \ Tpx - 23) \ 13
- iy = (y \ Tpy + 10) \ 14
- ' uncomment the next two statements to test the values in real time
- 'Debug.Print ix, iy
- 'Exit Sub
- If iy = 1 Then
- Spinning = True
- If ix = 1 Then
- i = -1
- ElseIf ix = 2 Then
- i = 1
- Else
- Exit Sub
- End If
- Do While Spinning
- ' holding down the mouse button spins the spinner
- ' change the value every .5 seconds
- If Timer - t > .5 Then
- t = Timer
- n = Val(WidthLab(zTab)) + i
- If n < 0 Then
- n = 0
- ElseIf n > 30 Then
- n = 30
- End If
- TabPan.EnablePainting = False
- BackPan.EnablePainting = False
- WidthPan.Icon = IconImg(ix).Picture
- WidthLab(zTab) = Str$(n)
- End If
- ShowOptions False
- Loop
- End If
- End Sub
- Sub WidthPan_MouseUp (Button As Integer, Shift As Integer, x As Single, y As Single)
- ' stop spinning
- Spinning = False
- ShowOptions False
- End Sub
-